<?php
include '../common.php';
include '../common/header.php';
if (!$_SESSION['admin']) {
	header("location:../login.php",302);
}
?>
<link href="<?=$website['public'];?>/admin/user.css" rel="stylesheet" type="text/css" />
<body>
    <div class="top">回复管理界面</div>
    <div class="m5">
	    <div class="tabs">
	     	<ul class="tab_menu">
		     	<li>回复管理</li>
		     	<li class="li"><a href="send.php">发帖管理</a></li>
				<li class="li"><a href="reviewed.php">已审核</a></li>
		     	<li class="li"><a href="unreviewed.php">未审核</a></li>
	     	</ul>
	     	<div class="tab_box">
				<table class="table">
					<thead>
					<tr>
						<th>序号</th>
						<th>回复用户</th>
						<th>发表内容ID</th>
						<th>回复内容</th>
						<th>回复时间</th>
						<th>操作</th>
					</tr>
					<tbody>
					<?php 
					$sql = "SELECT * FROM publish_revert ORDER BY id ASC";
					$row = select($sql,$DB);
					foreach ($row as $key => $value) { ?>
					<tr>
						<td><?php echo $value['id']?></td>
						<td><?php echo $value['name']?></td>
						<td><?php echo $value['publish_id']?></td>
						<td><?php echo $value['content']?></td>
						<td><?php if(empty($value['hour'])){
							echo "未知";
						}else{
							echo date('Y-m-d H:i:s',$row[0]['hour']);
						} ?></td>
						<td><a href="?delete=<?php echo $value['id']?>"><i class="iconfont icon-shanchu"></i></a></td>
					</tr>
					<?php } ?>
					</tbody>	
				</table>
	     	</div>
	    </div>
	</div>
</body>
</html>
